<?php
//Connect to database
$con = mysql_connect("localhost", "root", "");
if (!$con) {
    die('Could not connect: ' . mysql_error());
}

// Create database
if (mysql_query("CREATE DATABASE sMs_db", $con)) {
    echo "Database created";
} else {
    echo "Error creating database: " . mysql_error();
}
////  Create table
//mysql_select_db("sMs_db", $con);
//$sql = "CREATE TABLE Carsandvehicles(
//    Id int,
//    Item varchar(15),
//    Description varchar(30),
//    Phonenumber int(10),
//    Mailaddress varchar(20),
//    Address varchar(20),
//    correlation varchar(20),
//    )";

//// Execute query
//mysql_query($sql, $con);
//$sql1 = "CREATE TABLE Cars and vehicles(
//    Id int NOT NULL AUTO_INCREMENT,
//    PRIMARY KEY(Id),
//    Item VARCHAR(15),
//    Description VARCHAR(30),
//    Phonenumber INT(10),
//    Mailaddress VARCHAR(20),
//    Address VARCHAR(20),
//    correlation VARCHAR(20),
//    )";
//mysql_query($sql1, $con);
//$sql2 = "CREATE TABLE Property(
//    Id int NOT NULL AUTO_INCREMENT,
//    PRIMARY KEY(Id),
//    Item VARCHAR(15),
//    Description VARCHAR(30),
//    Phonenumber INT(10),
//    Mailaddress VARCHAR(20),
//    Address VARCHAR(20),
//    correlation VARCHAR(20),
//    )";
//mysql_query($sql2, $con);
//$sql3 = "CREATE TABLE Eloctronics(
//    Id int NOT NULL AUTO_INCREMENT,
//    PRIMARY KEY(Id),
//    Item VARCHAR(15),
//    Description VARCHAR(30),
//    Phonenumber INT(10),
//    Mailaddress VARCHAR(20),
//    Address VARCHAR(20),
//    correlation VARCHAR(20),
//    )";
//mysql_query($sql3, $con);
//$sql4 = "CREATE TABLE Home and Personal Items(
//    Id int NOT NULL AUTO_INCREMENT,
//    PRIMARY KEY(Id),
//    Item VARCHAR(15),
//    Description VARCHAR(30),
//    Phonenumber INT(10),
//    Mailaddress VARCHAR(20),
//    Address VARCHAR(20),
//    correlation VARCHAR(20),
//    )";
//mysql_query($sql4, $con);
//$sql5 = "CREATE TABLE Cars and vehicles(
//    Id int NOT NULL AUTO_INCREMENT,
//    PRIMARY KEY(iD),
//    Item VARCHAR(15),
//    Description VARCHAR(30),
//    Phonenumber INT(10),
//    Mailaddress VARCHAR(20),
//    Address VARCHAR(20),
//    correlation VARCHAR(20),
//    )";
//mysql_query($sql1, $con);
//$sql6 = "CREATE TABLE Cars and vehicles(
//    Id int NOT NULL AUTO_INCREMENT,
//    PRIMARY KEY(iD),
//    Item VARCHAR(15),
//    Description VARCHAR(30),
//    Phonenumber INT(10),
//    Mailaddress VARCHAR(20),
//    Address VARCHAR(20),
//    correlation VARCHAR(20),
//    )";
//mysql_query($sql1, $con);
//$sql7 = "CREATE TABLE Cars and vehicles(
//    Id int NOT NULL AUTO_INCREMENT,
//    PRIMARY KEY(iD),
//    Item VARCHAR(15),
//    Description VARCHAR(30),
//    Phonenumber INT(10),
//    Mailaddress VARCHAR(20),
//    Address VARCHAR(20),
//    correlation VARCHAR(20),
//    )";
//mysql_query($sql1, $con);
//$sql8 = "CREATE TABLE Cars and vehicles(
//    Id int NOT NULL AUTO_INCREMENT,
//    PRIMARY KEY(iD),
//    Item VARCHAR(15),
//    Description VARCHAR(30),
//    Phonenumber INT(10),
//    Mailaddress VARCHAR(20),
//    Address VARCHAR(20),
//    correlation VARCHAR(20),
//    )";
//mysql_query($sql1, $con);
mysql_close($con);

?>
